libxl: Do not trust frontend for vtpm in getinfo
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 3 May 2016 15:00:20 +0000 (16:00 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 2 Jun 2016 14:53:28 +0000 (15:53 +0100)
commit0dbc6af04f990c60e26c0898e02d5b741b9fcb20
tree4d05af99bba5bce72b9fa7790745f1467321ba17
parent0527125a6aae58a7eee8078184fced49dc2422ef
libxl: Do not trust frontend for vtpm in getinfo

libxl_device_vtpm_getinfo needs to examine devices without trusting
frontend-controlled data.  So:

* Use /libxl to find the backend path.
* Parse the backend path to find the backend domid, rather than
  reading it from the frontend.

This is part of XSA-175.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl.c